Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promtail pull cloudflare logs #4813

Merged
merged 20 commits into from
Dec 3, 2021
Merged

Conversation

cyriltovena
Copy link
Contributor

@cyriltovena cyriltovena commented Nov 24, 2021

What this PR does / why we need it:

This PR Adds a the ability to pull logs from cloudflare into Promtail.
See the documentation for more information.

Which issue(s) this PR fixes:
Fixes #4725

Special notes for your reviewer:

The cloudflare client was not supporting the log pull API so I'm using a fork for now.

Checklist

  • Documentation added
  • Tests updated
  • Add an entry in the CHANGELOG.md about the changes.

I still need to work on fields configuration and some unit testing.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉
Left a couple notes

clients/pkg/promtail/positions/positions.go Outdated Show resolved Hide resolved
clients/pkg/promtail/targets/cloudflare/metrics.go Outdated Show resolved Hide resolved
vendor/modules.txt Show resolved Hide resolved
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
@cyriltovena
Copy link
Contributor Author

I'll wait for the go on the documentation before merging.

Copy link
Contributor

@jeschkies jeschkies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was fast 🙂

I've added a few questions.

clients/cmd/promtail/promtail-cloudflare.yaml Outdated Show resolved Hide resolved
clients/pkg/promtail/positions/positions.go Outdated Show resolved Hide resolved
clients/pkg/promtail/targets/cloudflare/target.go Outdated Show resolved Hide resolved
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Copy link
Contributor

@KMiller-Grafana KMiller-Grafana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes needed. I am not certain that my suggestions for revising the configuration parameter definitions are correct with respect to enumerating values and specifying defaults. I tried to make suggestions that appear more like other places within our Loki configuration documentation.

docs/sources/clients/promtail/configuration.md Outdated Show resolved Hide resolved
docs/sources/clients/promtail/configuration.md Outdated Show resolved Hide resolved
docs/sources/clients/promtail/configuration.md Outdated Show resolved Hide resolved
docs/sources/clients/promtail/configuration.md Outdated Show resolved Hide resolved
docs/sources/clients/promtail/configuration.md Outdated Show resolved Hide resolved
docs/sources/clients/promtail/configuration.md Outdated Show resolved Hide resolved
docs/sources/clients/promtail/configuration.md Outdated Show resolved Hide resolved
docs/sources/clients/promtail/scraping.md Outdated Show resolved Hide resolved
cyriltovena and others added 9 commits December 3, 2021 10:11
Co-authored-by: Karen Miller <84039272+KMiller-Grafana@users.noreply.github.com>
Co-authored-by: Karen Miller <84039272+KMiller-Grafana@users.noreply.github.com>
Co-authored-by: Karen Miller <84039272+KMiller-Grafana@users.noreply.github.com>
Co-authored-by: Karen Miller <84039272+KMiller-Grafana@users.noreply.github.com>
Co-authored-by: Karen Miller <84039272+KMiller-Grafana@users.noreply.github.com>
Co-authored-by: Karen Miller <84039272+KMiller-Grafana@users.noreply.github.com>
Co-authored-by: Karen Miller <84039272+KMiller-Grafana@users.noreply.github.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
@cyriltovena
Copy link
Contributor Author

@KMiller-Grafana let me know if we're good to merge.

Copy link
Contributor

@KMiller-Grafana KMiller-Grafana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for implementing the changes. LGTM now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scrape CloudFlare Logs
4 participants